<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>学习</h1>
    <script>
      let p1 = new Promise((reslove, reject) => {
          setTimeout(() => {
            reslove("p1");
          }, 2000);
        }),
        p2 = new Promise((reslove, reject) => {
          setTimeout(() => {
            reslove("p2");
          }, 1000);
        }),
        p3 = new Promise((reslove, reject) => {
          setTimeout(() => {
            reslove("p3");
          }, 3000);
        }),
        p4 = new Promise((reslove, reject) => {
          setTimeout(() => {
            reslove("p4");
          }, 5000);
        });
      p5 = new Promise((reslove, reject) => {
        setTimeout(() => {
          reslove("p5");
        }, 9000);
      });

      (async () => {
        let data = await Promise.all([p1, p2, p3, p4, p5]);
        console.log("data:", data);
      })();
    </script>
  </body>
</html>
